package com.fanpan26.source.queue;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @author fanpan26
 */
public class ArrayBlockingQueueSourceCode {
    public static void main(String[] args) throws InterruptedException {
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(10);

        //添加一个数据
        queue.add("A");
        queue.add("B");

        queue.put("C");

        queue.take();
        queue.poll();

        queue.peek();

        queue.clear();
    }
}
